#include<iostream>
using namespace std;
const static float PI = 3.14;
class Point {
    private:
        float x,y;
    public:
        Point(float x,float y){
            this->x = x;
            this->y = y;
        }

        virtual double area() {
            return 0;
        }
};

class Circle:public Point{
    private:
        float radius;
    public:
        Circle(float a,float b,float r):Point(a,b),radius(r) {}
        double area() {
            return PI * radius * radius;
        }
};

void display(Point *p) {
    cout << p->area() << endl;
}

void display(Point& r) {
    cout << r.area() << endl;
}

int main() {
    Circle c(3,4,5);
    Point a = c;
    Point *p = &c;
    Point &r = new Circle(4,5,6);
    display(a);
    display(p);
    display(r);

    return 0;
}
